import request from "@/utils/request";

/**
 * 获取用户订单列表
 */
export const getOrderList = () => {
    return request.get('/order')
}

/**
 * 查看订单详情
 */
export const getOrderDetail = (orderId) => {
    return request.get(`/order/${orderId}`)
}

/**
 * 取消（关闭）订单
 */
export const cancelOrder = (orderId) => {
    return request.put(`/order/close/${orderId}`)
}

/**
 * 确认（完成）订单
 */
export const confirmOrder = (orderId) => {
    return request.put(`/order/complete/${orderId}`)
}
